import './users.html';

import '../components/data_table/data_table.js';




Template.Admin_Users.onCreated(function () {
		let self = this;

		

		self.loadready = new ReactiveVar();


	
		self.autorun((c) => {

		self.loadready.set(FlowRouter.subsReady("onepage.links"));

		if (self.loadready.get()) {
			

		}



	  });
	

});



Template.Admin_Users.helpers({
	
	modelname(){
		return '用户';
	},
	tableheads(){
		return ['注册时间','手机号','角色', '用户名'];
	},
	subsReady(){
		return 'onepage.users';
	},
	modelmethods(){
		return {
			delete: "users.delete",
			create: "users.insert",
			update: "users.update"
		}
	},
	render(modelname, tableheads, subsReady, modelmethods) {
		return {
			modelname,
			tableheads,
			subsReady,
			model: Meteor.users,
			modelmethods
		};
	},

	renderCreateModal(title, createForm){
		return {
			title
		}
	},

	title(){
		return '';
	},

	createForm(){
		return 'new_link_form';
	}

})